using HTFramework;
using UnityEngine;

public class CellView : IPoolable
{
    public GameObject Go;
    bool mHasSpawn;

    public CellView()
    {
        mHasSpawn = false;
    }
    
    public void OnSpawn(GameObject go)
    {
        if (mHasSpawn) return;
        Go = go;
        mHasSpawn = true;
    }

    public void OnDespawn()
    {
        if (!mHasSpawn) return;
        Go = null;
        mHasSpawn = false;
    }

    public void SetPos(Vector3 pos)
    {
        if (!mHasSpawn) return;
        Go.transform.position = pos;
    }

    public void Dispose()
    {
    }

    public int ObjectPoolIndex { get; set; }
}
